const {getOptions} = require('loader-utils');
exports.default = function loader(source) {
  const options = getOptions(this);

  source = source.replace(/\{\{name\}\}/g, options.name);

  return `export default ${ JSON.stringify(source) }`;
};